package com.duoduo.springboot.security.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class AppController {

	private static final Logger logger = LoggerFactory.getLogger(AppController.class);

	@RequestMapping("/login")
	public String login() {
		return "login";
	}

	@RequestMapping("/home")
	public String home() {
		return "home";
	}

	@RequestMapping("/hello")
	public String hello() {
		return "hello";
	}

	@RequestMapping("/403")
	public String unauthorized() {
		logger.info("------没有权限-------");
		return "error/403";
	}

	@RequestMapping("/404")
	public String notFound() {
		logger.info("------没有找到页面-------");
		return "error/404";
	}
}
